package tech.aistar.service.demand.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import tech.aistar.mapper.deamnd.DemandQueryMapper;
import tech.aistar.service.demand.IDemandQueryService;
import tech.aistar.vo.demand.DemandQueryVo;

import java.util.List;

/**
 * Created by 豆梦寒 on 2019/10/10.
 */
@Service
public class DemandQueryServiceImpl implements IDemandQueryService{

    @Autowired
    private DemandQueryMapper demandQueryMapper;
    @Override
    public List<DemandQueryVo> findAndName(){
        List<DemandQueryVo> list = demandQueryMapper.findAndName();
        return list;
    }

    @Override
    public List<DemandQueryVo> findByName(String title) {
        List<DemandQueryVo> list = demandQueryMapper.findByName(title);
        return list;
    }

    @Override
    public List<DemandQueryVo> findByCategory(Integer categoryId) {
        List<DemandQueryVo> list = demandQueryMapper.findByCategory(categoryId);
        return list;
    }

    @Override
    public List<DemandQueryVo> findByCategoryDetail(Integer categorydetailId) {
        List<DemandQueryVo> list = demandQueryMapper.findByCategoryDetail(categorydetailId);
        return list;
    }

    @Override
    public List<DemandQueryVo> findByCount() {
        List<DemandQueryVo> list = demandQueryMapper.findByCount();
        return list;
    }

    @Override
    public List<DemandQueryVo> findBybeginTime() {
        List<DemandQueryVo> list = demandQueryMapper.findBybeginTime();
        return list;
    }

    @Override
    public List<DemandQueryVo> findByPriceDesc() {
        List<DemandQueryVo> list = demandQueryMapper.findByPriceDesc();
        return list;
    }

    @Override
    public List<DemandQueryVo> findByPrice() {
        List<DemandQueryVo> list = demandQueryMapper.findByPrice();
        return list;
    }

    @Override
    public List<DemandQueryVo> findByPriceRange(Double minPrice, Double maxPrice) {
        List<DemandQueryVo> list = demandQueryMapper.findByPriceRange(minPrice,maxPrice);
        return list;
    }
}
